import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'flutter_wifi_connector_method_channel.dart';

abstract class FlutterWifiConnectorPlatform extends PlatformInterface {
  /// Constructs a FlutterWifiConnectorPlatform.
  FlutterWifiConnectorPlatform() : super(token: _token);

  static final Object _token = Object();

  static FlutterWifiConnectorPlatform _instance = MethodChannelFlutterWifiConnector();

  /// The default instance of [FlutterWifiConnectorPlatform] to use.
  ///
  /// Defaults to [MethodChannelFlutterWifiConnector].
  static FlutterWifiConnectorPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [FlutterWifiConnectorPlatform] when
  /// they register themselves.
  static set instance(FlutterWifiConnectorPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  /// Connect to WiFi network with given SSID and password
  /// Saves the network permanently to the device
  /// 
  /// Returns a Map with:
  /// - 'success': bool indicating if connection was successful
  /// - 'message': String with status message
  Future<Map<String, dynamic>> connectToWifi(String ssid, String password) {
    throw UnimplementedError('connectToWifi() has not been implemented.');
  }
}
